package com.nav.tictactoe;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class PlayerActivity extends Activity {
	Button sharedBut, networkBut;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_player);
        sharedBut = (Button)findViewById(R.id.SharedScreen);
        sharedBut.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				SharedData.gameType = GameType.SHARED_SCREEN;
				Intent intent = new Intent(v.getContext(), GameActivity.class);
				startActivity(intent);
			}
		});
        networkBut = (Button)findViewById(R.id.Network);
        networkBut.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				SharedData.gameType = GameType.NETWORK;
				Intent intent = new Intent(v.getContext(), HostActivity.class);
				startActivity(intent);
			}
		});
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}
